/*
 * @Author: Soulmate
 * @Date: 2023-11-16 13:37:26
 * @LastEditTime: 2023-11-16 13:55:39
 * @LastEditors: Soulmate
 * @Description: 
 * @FilePath: \electron-app\electron\plugin\initMenu.ts
 * 版权声明
 */
const { Menu, MenuItem } = require('electron');

const menu = new Menu()
menu.append(new MenuItem({
  label: 'Electron',
  submenu: [{
    role: 'help',
    accelerator: process.platform === 'darwin' ? 'Alt+Cmd+I' : 'Alt+Shift+I',
    click: () => { console.log('Electron rocks!') }
  }]
}))

const initMenu = () => Menu.setApplicationMenu(menu)

module.exports = initMenu

